﻿

function GAProcessLogin(data) {
    u = jQuery.parseJSON(data);
    if (u.ticket != null) {
        setCookie("ticket", u.ticket, 1);
        $("#DivLogin").html("Welcome back " + u.user);
    } else {
        $("#DivLoginMessage").html("Invalid username or password.  Please try again");
    }
}

function GALogin(user, pass) {
    //alert("got a login for " + user + " and " + pass);
    $.get("/login.py", { user: user, pass: pass }, GAProcessLogin );
    setCookie("login", "yes!", 1);
    //alert("finished get");
};

